package week11;

import java.util.ArrayList;

public class WorksDemo {
    public static void main(String[] args) {
        ArrayList<Works> Works = new ArrayList<>();
        Works works1 = new Works("王师傅",32,4645);
        Works works2 = new Works("王师傅",32,4656);
        Works works3= new Works("王师傅",32,3455);
        Works.add(works1);
        Works.add(works2);
        Works.add(works3);
        for (int i = 0; i < Works.size(); i++) {
            System.out.println("工人的名字"+Works.get(i).getName());
            System.out.println("工人的年龄"+Works.get(i).getAge());
            System.out.println("工人的工资"+Works.get(i).getWage());

        }


    }
}
